package com.sixth.controller;

import com.sixth.bean.MarketAddress;
import com.sixth.bean.common.BasePageInfo;
import com.sixth.bean.common.BasePageInfoVo;
import com.sixth.bean.common.BaseRespVo;
import com.sixth.service.AdminAddressService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName AdminAddressController
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/7 15:48
 **/
@RestController
@RequestMapping("admin/address")
public class AdminAddressController {

    @Autowired
    AdminAddressService adminAddressService;

    @RequiresPermissions(value = "admin:address:list",logical = Logical.OR)
    @RequestMapping("list")
    public BaseRespVo<Object> list(BasePageInfo basePageInfo,Integer userId,String name){

        Object basePageInfoVo = adminAddressService.list(basePageInfo,userId,name);

        return BaseRespVo.ok(basePageInfoVo);
    }

}
